package com.gupaoedu.pattern.singleton.destroy;


import java.io.Serializable;
/**
 * 2019/5/11
 * created by chenpp
 * 序列化可以破坏单例
 */

public class SeriableSingleton implements Serializable {

    private static SeriableSingleton instacne = new SeriableSingleton();
    private SeriableSingleton (){}
    public static SeriableSingleton getInstance(){
        return instacne;
    }

    public Object readResolve(){
        return instacne;
    }
}
